<template>
  <view class="box-itm" v-if="shop && shop[0]">
    <Title icon="title-icon1" title="附近的经销商"></Title>
    <!-- <view class="box-itm-btn">综合排序</view> -->
    <view class="box-itm-name">{{ shop[0].name }}</view>
    <view class="box-itm-adress">
      <ImgIcon class="icon" size="32*32" src="static/icons/icon-subtract.png"></ImgIcon>
      <text>{{ shop[0].address }}</text>
    </view>
    <view class="box-itm-way">
      <ImgIcon class="icon" size="32*32" src="static/icons/icon-vector.png"></ImgIcon>
      <text>{{ shop[0].distance }}km</text>
    </view>
    <view class="box-itm-join" @click="onContactSales(shop, carid)">
      <view class="btn">免费咨询 </view>
    </view>
  </view>
</template>

<script setup>
import Title from "@/components/ui/title"
import ImgIcon from "@/components/ui/img-icon"
import { onContactSales } from "../../data"

const { shop, carid } = defineProps(['shop', "carid"])

</script>

<style lang="less" scoped>
@import url(./index.less);
</style>
